package sy.pageModel;

import java.util.LinkedHashMap;
import java.util.Map;

public class OrderGoods {
	
	public final static String GOODS_TYPE_FOOD = "07";
	public final static String GOODS_TYPE_HEALTH = "08";
	public final static String GOODS_TYPE_ART = "09";
	
    public final static Map<String, String> GOODS_TYPE_MAP = new LinkedHashMap<String, String>();
	
	static {
		GOODS_TYPE_MAP.put(GOODS_TYPE_FOOD, "食品");
		GOODS_TYPE_MAP.put(GOODS_TYPE_HEALTH, "保健品");
		GOODS_TYPE_MAP.put(GOODS_TYPE_ART, "工艺品");
	}
	
	private int page;
	private int rows;
	private String sort;
	private String order;
	private String ids;
	private String createTimeStart;
	private String createTimeEnd;
	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}
	
	public String getCreateTimeStart() {
		return createTimeStart;
	}

	public void setCreateTimeStart(String createTimeStart) {
		this.createTimeStart = createTimeStart;
	}
	
	public String getCreateTimeEnd() {
		return createTimeEnd;
	}

	public void setCreateTimeEnd(String createTimeEnd) {
		this.createTimeEnd = createTimeEnd;
	}
	
	private String id = "";
	private String orderId = "";
	private String cardId = "";
	private String name = "";
	private String status = "";
	private String mobile = "";
	private String createTime = "";
	private String agencyName = ""; //供应商名称
	private String agencyId = "";//供应商id
	private String goodsId = ""; //商品id
	private String goodsName = ""; //商品名称
	private int goodsCount; //商品个数
	private double goodsFee;  //商品单价
	private double totalFee;    //总费用（单价X商品个数）
	private double actualFee;   //实际费用
	private String serviceDetails = ""; //服务详单
	private String memberType = "";
	private String addressId = ""; //配送地址id
	private String goodsType = "";
	private String setId = ""; //系列id
	private String setName = ""; //系列名称
	private String unit = ""; //单位
	private String year = ""; //年份
	
	public String getGoodsType() {
		return this.goodsType;
	}
	
	public String getGoodsTypeName() {
		return GOODS_TYPE_MAP.get(this.goodsType);
	}
	
	public void setGoodsType(String goodsType) {
		this.goodsType = goodsType;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getStatus() {
		return this.status;
	}
	
	public String getStatusName() {
		return OrderDoctor.ORDER_STATUS_MAP.get(status);
	}
	
	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getMobile() {
		return mobile;
	}
	
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public String getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	public String getAgencyName() {
		return agencyName;
	}
	
	public void setAgencyName(String agencyName) {
		this.agencyName = agencyName;
	}
	
	public String getAgencyId() {
		return agencyId;
	}
	
	public void setAgencyId(String agencyId) {
		this.agencyId = agencyId;
	}
	
	public String getGoodsId() {
		return goodsId;
	}
	
	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}
	
	public String getGoodsName() {
		return goodsName;
	}
	
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	
	public int getGoodsCount() {
		return goodsCount;
	}
	
	public void setGoodsCount(int goodsCount) {
		this.goodsCount = goodsCount;
	}
	
	public double getGoodsFee() {
		return goodsFee;
	}
	
	public void setGoodsFee(double goodsFee) {
		this.goodsFee = goodsFee;
	}
	
	public double getTotalFee() {
		return totalFee;
	}
	
	public void setTotalFee(double totalFee) {
		this.totalFee = totalFee;
	}
	
	public double getActualFee() {
		return actualFee;
	}
	
	public void setActualFee(double actualFee) {
		this.actualFee = actualFee;
	}
	
	public String getServiceDetails() {
		return serviceDetails;
	}
	
	public void setServiceDetails(String serviceDetails) {
		this.serviceDetails = serviceDetails;
	}
	
	public String getMemberType() {
		return this.memberType;
	}
	
	public String getMemberTypeName() {
		return Member.MEMBER_TYPE_MAP.get(memberType);
	}
	
	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}
	
	public String getAddressId() {
		return this.addressId;
	}
	
	public void setAddressId(String addressId) {
		this.addressId = addressId;
	}
	
	public String getSetId() {
		return this.setId;
	}
	
	public void setSetId(String setId) {
		this.setId = setId;
	}
	
	public String getSetName() {
		return this.setName;
	}
	
	public void setSetName(String setName) {
		this.setName = setName;
	}
	
	public String getUnit() {
		return this.unit;
	}
	
	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	public String getYear() {
		return this.year;
	}
	
	public void setYear(String year) {
		this.year = year;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id='" + id + "', ");
		sb.append("cardId='" + cardId + "', ");
	    sb.append("name='" + name + "', ");
	    sb.append("status='" + status + "', ");
	    sb.append("statusName='" + this.getStatusName() + "', ");
	    sb.append("mobile='" + mobile + "', ");
	    sb.append("orderId='" + orderId + "', ");
	    sb.append("createTime='" + createTime + "', ");
	    sb.append("agencyId='" + agencyId + "', ");
	    sb.append("agencyName='" + agencyName + "', ");
	    sb.append("goodsId='" + goodsId + "', ");
	    sb.append("goodsName='" + goodsName + "', ");
	    sb.append("goodsCount='" + goodsCount + "', ");
	    sb.append("goodsFee='" + goodsFee + "', ");
	    sb.append("totalFee='" + totalFee + "', ");
	    sb.append("actualFee='" + actualFee + "', ");
	    sb.append("memberType='" + memberType + "', ");
	    sb.append("memberTypeName='" + actualFee + "', ");
	    sb.append("addressId='" + addressId + "', ");
	    sb.append("setId='" + setId + "', ");
	    sb.append("setName='" + setName + "', ");
	    sb.append("unit='" + unit + "', ");
	    sb.append("serviceDetails='" + serviceDetails + "'");
	    return sb.toString();		
	}
}
